export interface WorkflowNode {
  class_type: string;
  inputs: {
    text?: string;
    seed?: number;
    steps?: number;
    cfg?: number;
    sampler_name?: string;
    width?: number;
    height?: number;
    batch_size?: number;
    [key: string]: any;
  };
}

export interface WorkflowJson {
  [key: string]: WorkflowNode;
}

export interface Workflow {
  id?: string;
  name: string;
  description?: string;
  category: string;
  workflow_json: Record<string, any>;
  param_schema: Record<string, any>;
  preview_image?: string;
  created_at?: string;
  updated_at?: string;
  author?: string;
  model_type?: string;
}

export interface GenerationResponse {
  success: boolean;
  prompt_id: string;
  client_id: string;
  message: string;
  status: string;
  progress?: number;
  outputs?: GenerationOutputs;
  error?: string;
}

export interface GenerationImage {
  filename: string;
}

export interface GenerationOutput {
  images: GenerationImage[];
}

export interface GenerationOutputs {
  [key: string]: GenerationOutput;
}

export interface GenerationResult {
  outputs: GenerationOutputs;
  status: string;
  progress?: number;
  error?: string;
}

export interface GenerationStatusResponse {
  success: boolean;
  data: GenerationResult;
  message?: string;
}

export interface WorkflowResponse {
  success: boolean;
  data: Workflow;
  message?: string;
}

export interface WorkflowListResponse {
  success: boolean;
  data: Workflow[];
  message?: string;
}

export interface CreateWorkflowResponse extends WorkflowResponse { }
export interface UpdateWorkflowResponse extends WorkflowResponse { }